#pragma once
#ifdef _MSVC_LANG
#pragma  execution_character_set("UTF-8")
#endif

#include <QObject>
#include <QThread>
#include <QTimer>
class   CworkThread  : public QObject
{
	Q_OBJECT

public:
	CworkThread(QObject *parent = nullptr);
	~CworkThread();

public slots:



	 virtual int run() = 0;
	void stop() const;

	void set_enable(bool enable);
	bool get_enable()const;

	bool isThradRun();

	void start(int interval) const;


private:
	bool m_enable = false;
	QThread* thread;
	QTimer* timer;



};
